#include "Udpserver.hpp"
#include "Comm.hpp"
#include <memory>

// Usage(用法/用途)
void Usage(string proc)
{
    // local(本地)
    cout << "Usage : \n\t" << proc << " + (local_ip) + (local_port)\n"
         << endl;
}

int main(int argc, char *argv[])
{

    if (argc != 2)
    {
        Usage(argv[0]);
        return Usage_Err;
    }
    //string ip = argv[1];
    uint16_t port = stoi(argv[1]);

    unique_ptr<Udpserver> usvr = make_unique<Udpserver>(port);

    usvr->Init();
    usvr->Start();

    return 0;
}
